package com.xuecheng.api.media.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 课程-教师关系表
 */
@Data
@ApiModel(value="CourseTeacherDTO", description="课程-教师关系表")
public class CourseTeacherDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    private Long courseTeacherId;

    @ApiModelProperty(value = "课程标识", required = true)
    @NotNull(message = "课程标识不能为空")
    @Min(value = 0, message = "课程标识格式有误")
    private Long courseId;

    private Long coursePubId;

    @ApiModelProperty(value = "教师姓名", required = true)
    @NotEmpty(message = "教师姓名不能为空")
    private String teacherName;

    @ApiModelProperty(value = "教师职位", required = true)
    @NotEmpty(message = "教师职位不能为空")
    private String position;

    @ApiModelProperty(value = "教师简介")
    private String introduction;

    @ApiModelProperty(value = "照片", required = true)
    private String photograph;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createDate;


}
